<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
            <h3>v-model修饰符</h3>
            <!-- .number 转数字 -->
            <!-- 注意,如果转不成数字 得到的就是字符串 -->
            <!-- <input v-model.number="msg" type="text"> -->
            <!-- 去除首尾空格 -->
            <input v-model.trim="msg" type="text">

    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
      const app = new Vue({
        el: '#app',
        data: {
          msg: ''
        },
        methods: {
        
        }
      })
    </script>
</body>
</html>